{% extends "users/settings/base.html" %}

{% block title %}
	邮箱
{% endblock %}

{% block edit %}
	<div class="row">
		<div class="col-sm-8 settings-content">
			<form class="form-horizontal" role="form" action="{% url 'users:safety-email' request.user.id %}" method="post">
				<!--防止恶意攻击-->
				{% csrf_token %}
				<!--邮箱-->
				{% if email_error %}
					<div class="form-group has-error">
						<label class="col-sm-2 control-label">邮箱：</label>
						<div class="col-sm-10">
							<input type="text" name="email" class="form-control" placeholder="请输入邮箱" value="{{ user.email }}"/>
              <p class="text-danger small">*{{ email_error }}</p>
						</div>
					</div>
				{% else %}
					<div class="form-group">
						<label class="col-sm-2 control-label">邮箱：</label>
						<div class="col-sm-10">
							<input type="text" name="email" class="form-control" placeholder="请输入邮箱" value="{{ user.email }}"/>
						</div>
					</div>
				{% endif %}
				<hr/>
				<!--保存按钮-->
				<button type="submit" class="btn btn-primary pull-right visible-sm visible-md visible-lg">保存</button>
				<button type="submit" class="btn btn-primary btn-block visible-xs">保存</button>
			</form>
		</div>
	</div>
{% endblock %}